package com.yanqu.road.server.timer.unionwar;

import com.yanqu.road.server.manager.unionwar.CrossUnionWarMgr;
import com.yanqu.road.utils.executor.GeneralTask;

public class UnionWarBattleCheckTask extends GeneralTask {
    private boolean isRun = false;
    private long lastCheckTime;
    @Override
    public void doRun() {
        if(!isRun) {
            isRun = true;
            long nowTime = System.currentTimeMillis();
            if(nowTime - lastCheckTime > 30000) {//30秒进入检测
                CrossUnionWarMgr.unionWarTimeTask();
                lastCheckTime = nowTime;
            }
            isRun = false;
        }
    }
}
